<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue-Cloak</title>
    <script src="./lib/vue-2.4.0.js"></script>
    <style>
        [v-clock] {
            display: none;
        }
    </style>
</head>
<body>
    <div id="app">
        <!-- Avoid {{msg}} appear -->
        <p v-cloak>{{ msg }}</p>
        <h4 v-text="msg"></h4>
        <!-- Output Tag -->
        <div v-html="msg2"></div>

        <!--v-bind to the attrib-->
        <input type="button" value="Click" v-bind:title="mytitle + '123'">
        <input type="button" value="Click" :title="mytitle + '456'">

        <!-- v-on to bind a event -->
        <input type="button" value="Click" v-on:click="show">
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                msg: '123',
                msg2: "<h1>To show v-html</h1>",
                mytitle: "This is a title"
            },
            methods: {
                show: function(){
                    alert("You get me!");
                }
            }
        })
    
    </script>

</body>
</html>